/**
 * 
 */
package com.epart.widget.util;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

/**
 * DB 유틸리티 클래스
 * 
 * @author cwsong
 * @version 2011. 3. 11.
 */
public class DBUtil {

	/**
	 * da finally구문 템플릿을 출력한다.
	 * 
	 * @param rs
	 * @param psmt
	 * @param conn
	 */
	public static void doFinally(ResultSet rs, PreparedStatement psmt, Connection conn) {
		if (rs != null) {
			try {
				rs.close();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		if (psmt != null) {
			try {
				psmt.close();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		/*
		 * if(conn != null){ try{ conn.close(); }catch(Exception e){
		 * e.printStackTrace(); } }
		 */
	}
}
